package com.ysstech.dataway.thread;

import com.ysstech.common.util.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;

import java.util.Date;
import java.util.concurrent.Callable;

@Slf4j
public class DatawayThread implements Callable<T> {
    private DatawayGenerateService datawayGenerateService;


    public DatawayThread(DatawayGenerateService datawayGenerateService) {
        this.datawayGenerateService = datawayGenerateService;
    }

    @Override
    public T call() throws Exception {
        log.info(DateUtil.dateToStrByFormat(new Date(), "yyyy-MM-dd HH:mm:ss:SSS"));
        datawayGenerateService.doGenerate();
        return null;
    }
}
